import Vue from 'vue'
import Router from 'vue-router'
import SView from '@/components/SView'
import InitView from '@/components/InitView'
import HView from '@/components/HView'
import VMultiplayTwoView from '@/components/VMultiplayTwoView'
import VMultiplayThreeView from '@/components/VMultiplayThreeView'
import AreaView from '@/components/areas/AreaView'
import HView3 from '../components/h3/HView3.vue'

Vue.use(Router)
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push(to) {
  return VueRouterPush.call(this, to).catch(err => err)
}
export default new Router({
  routes: [
    {
      path: '/',
      name: 'h1',
      component: AreaView
    },
    {
      path: '/v1',
      name: 'v1',
      component: SView
    },
    {
      path: '/v2',
      name: 'v2',
      component: VMultiplayTwoView
    },
    {
      path: '/v3',
      name: 'v3',
      component: VMultiplayThreeView
    }, {
      path: '/i',
      name: 'InitView',
      component: InitView
    }, {
      path: '/h2',
      name: 'h2',
      component: HView
    },
    {
      path: "/h1",
      name: "h1",
      component: AreaView
    },
    {
      path: '/h3',
      name: 'h3',
      component: HView3
    }
  ]
})
